<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-comment">{- |
   Module      :  System.Win32.Exception.Unsupported
   Copyright   :  2012 shelarcy
   License     :  BSD-style

   Maintainer  :  shelarcy@gmail.com
   Stability   :  Provisional
   Portability :  Non-portable (Win32 API)

   Exception handling if using unsupported Win32 API.
-}</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">System.Win32.Exception.Unsupported</span><span>
</span><span id="line-15"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html"><span class="hs-identifier">System.Win32.Exception.Unsupported</span></a></span><span>
</span><span id="line-16"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#Exception"><span class="hs-identifier">Exception</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier">throwIO</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.html#"><span class="hs-identifier">Data.Typeable</span></a></span><span>          </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier">Typeable</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.Ptr.html#"><span class="hs-identifier">Foreign.Ptr</span></a></span><span>            </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier">Ptr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#nullPtr"><span class="hs-identifier">nullPtr</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Foreign.Marshal.Unsafe.html#"><span class="hs-identifier">Foreign.Marshal.Unsafe</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Foreign.Marshal.Unsafe.html#unsafeLocalState"><span class="hs-identifier">unsafeLocalState</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- Exception type of Unsupported</span><span>
</span><span id="line-25"></span><span class="hs-comment">----------------------------------------------------------------</span><span>
</span><span id="line-26"></span><span class="hs-keyword">data</span><span> </span><span id="Unsupported"><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-var">Unsupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MissingLibrary"><span class="annot"><a href="System.Win32.Exception.Unsupported.html#MissingLibrary"><span class="hs-identifier hs-var">MissingLibrary</span></a></span></span><span>  </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-27"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="MissingFunction"><span class="annot"><a href="System.Win32.Exception.Unsupported.html#MissingFunction"><span class="hs-identifier hs-var">MissingFunction</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>   </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-28"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="MissingValue"><span class="annot"><a href="System.Win32.Exception.Unsupported.html#MissingValue"><span class="hs-identifier hs-var">MissingValue</span></a></span></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>   </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-29"></span><span>                 </span><span class="hs-keyword">deriving</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679103406"><span id="local-6989586621679103409"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-type">Unsupported</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-32"></span><span>  </span><span id="local-6989586621679103404"><span class="annot"><span class="annottext">show :: Unsupported -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var hs-var hs-var hs-var">show</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#MissingLibrary"><span class="hs-identifier hs-type">MissingLibrary</span></a></span><span>  </span><span id="local-6989586621679103402"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103402"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679103401"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103401"><span class="hs-identifier hs-var">reason</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't load library \&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103402"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\&quot;. &quot;</span></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103401"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-34"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#MissingFunction"><span class="hs-identifier hs-type">MissingFunction</span></a></span><span> </span><span id="local-6989586621679103400"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103400"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679103399"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103399"><span class="hs-identifier hs-var">reason</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't find \&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103400"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\&quot; function. &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103399"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-36"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#MissingValue"><span class="hs-identifier hs-type">MissingValue</span></a></span><span>    </span><span id="local-6989586621679103398"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103398"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679103397"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103397"><span class="hs-identifier hs-var">reason</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't use \&quot;&quot;</span></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103398"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\&quot; value. &quot;</span></span><span>    </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103397"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679103387"><span id="local-6989586621679103389"><span id="local-6989586621679103391"><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#Exception"><span class="hs-identifier hs-type">Exception</span></a></span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-type">Unsupported</span></a></span></span></span></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#missingLibrary"><span class="hs-identifier hs-type">missingLibrary</span></a></span><span>                          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-type">Unsupported</span></a></span><span>
</span><span id="line-42"></span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#missingFunction"><span class="hs-identifier hs-type">missingFunction</span></a></span><span class="hs-special">,</span><span>      </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#missingValue"><span class="hs-identifier hs-type">missingValue</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-type">Unsupported</span></a></span><span>
</span><span id="line-43"></span><span id="missingLibrary"><span class="annot"><span class="annottext">missingLibrary :: String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#missingLibrary"><span class="hs-identifier hs-var hs-var">missingLibrary</span></a></span></span><span>  </span><span id="local-6989586621679103382"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103382"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#MissingLibrary"><span class="hs-identifier hs-var">MissingLibrary</span></a></span><span>  </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103382"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-44"></span><span id="missingFunction"><span class="annot"><span class="annottext">missingFunction :: String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#missingFunction"><span class="hs-identifier hs-var hs-var">missingFunction</span></a></span></span><span> </span><span id="local-6989586621679103381"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103381"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#MissingFunction"><span class="hs-identifier hs-var">MissingFunction</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103381"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-45"></span><span id="missingValue"><span class="annot"><span class="annottext">missingValue :: String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#missingValue"><span class="hs-identifier hs-var hs-var">missingValue</span></a></span></span><span>    </span><span id="local-6989586621679103380"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103380"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#MissingValue"><span class="hs-identifier hs-var">MissingValue</span></a></span><span>    </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103380"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#missingWin32Function"><span class="hs-identifier hs-type">missingWin32Function</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#missingWin32Value"><span class="hs-identifier hs-type">missingWin32Value</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-type">Unsupported</span></a></span><span>
</span><span id="line-48"></span><span id="missingWin32Function"><span class="annot"><span class="annottext">missingWin32Function :: String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#missingWin32Function"><span class="hs-identifier hs-var hs-var">missingWin32Function</span></a></span></span><span> </span><span id="local-6989586621679103377"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103377"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679103376"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103376"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#MissingFunction"><span class="hs-identifier hs-var">MissingFunction</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103377"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Unsupported) -&gt; String -&gt; Unsupported
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="System.Win32.Exception.Unsupported.html#doesn%27tSupport"><span class="hs-identifier hs-var">doesn'tSupport</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103376"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-49"></span><span id="missingWin32Value"><span class="annot"><span class="annottext">missingWin32Value :: String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#missingWin32Value"><span class="hs-identifier hs-var hs-var">missingWin32Value</span></a></span></span><span>    </span><span id="local-6989586621679103374"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103374"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679103373"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103373"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#MissingValue"><span class="hs-identifier hs-var">MissingValue</span></a></span><span>    </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103374"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Unsupported) -&gt; String -&gt; Unsupported
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="System.Win32.Exception.Unsupported.html#doesn%27tSupport"><span class="hs-identifier hs-var">doesn'tSupport</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103373"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#doesn%27tSupport"><span class="hs-identifier hs-type">doesn'tSupport</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#upgradeVista"><span class="hs-identifier hs-type">upgradeVista</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#removed"><span class="hs-identifier hs-type">removed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-52"></span><span id="doesn%27tSupport"><span class="annot"><span class="annottext">doesn'tSupport :: String
</span><a href="System.Win32.Exception.Unsupported.html#doesn%27tSupport"><span class="hs-identifier hs-var hs-var">doesn'tSupport</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Because it's not supported on this OS.&quot;</span></span><span>
</span><span id="line-53"></span><span id="upgradeVista"><span class="annot"><span class="annottext">upgradeVista :: String
</span><a href="System.Win32.Exception.Unsupported.html#upgradeVista"><span class="hs-identifier hs-var hs-var">upgradeVista</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="System.Win32.Exception.Unsupported.html#upgradeWindowsOS"><span class="hs-identifier hs-var">upgradeWindowsOS</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Windows Vista&quot;</span></span><span>
</span><span id="line-54"></span><span id="removed"><span class="annot"><span class="annottext">removed :: String
</span><a href="System.Win32.Exception.Unsupported.html#removed"><span class="hs-identifier hs-var hs-var">removed</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;It's removed. &quot;</span></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#upgradeWindowsOS"><span class="hs-identifier hs-type">upgradeWindowsOS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-57"></span><span id="upgradeWindowsOS"><span class="annot"><span class="annottext">upgradeWindowsOS :: ShowS
</span><a href="System.Win32.Exception.Unsupported.html#upgradeWindowsOS"><span class="hs-identifier hs-var hs-var">upgradeWindowsOS</span></a></span></span><span> </span><span id="local-6989586621679103369"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103369"><span class="hs-identifier hs-var">ver</span></a></span></span><span>
</span><span id="line-58"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;If you want to use it, please upgrade your OS to &quot;</span></span><span>
</span><span id="line-59"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103369"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; or higher.&quot;</span></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span id="local-6989586621679103436"><span class="annot"><a href="System.Win32.Exception.Unsupported.html#unsupportedIfNull"><span class="hs-identifier hs-type">unsupportedIfNull</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Win32.Exception.Unsupported.html#Unsupported"><span class="hs-identifier hs-type">Unsupported</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679103436"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679103436"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-62"></span><span id="unsupportedIfNull"><span class="annot"><span class="annottext">unsupportedIfNull :: forall a. Unsupported -&gt; IO (Ptr a) -&gt; IO (Ptr a)
</span><a href="System.Win32.Exception.Unsupported.html#unsupportedIfNull"><span class="hs-identifier hs-var hs-var">unsupportedIfNull</span></a></span></span><span> </span><span id="local-6989586621679103361"><span class="annot"><span class="annottext">Unsupported
</span><a href="#local-6989586621679103361"><span class="hs-identifier hs-var">wh</span></a></span></span><span> </span><span id="local-6989586621679103360"><span class="annot"><span class="annottext">IO (Ptr a)
</span><a href="#local-6989586621679103360"><span class="hs-identifier hs-var">act</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-63"></span><span>  </span><span id="local-6989586621679103359"><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679103359"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (Ptr a)
</span><a href="#local-6989586621679103360"><span class="hs-identifier hs-var">act</span></a></span><span>
</span><span id="line-64"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679103359"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a -&gt; Ptr a -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Ptr a
forall a. Ptr a
</span><a href="../../base/src/GHC.Ptr.html#nullPtr"><span class="hs-identifier hs-var">nullPtr</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Ptr a -&gt; IO (Ptr a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr a
</span><a href="#local-6989586621679103359"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Unsupported -&gt; IO (Ptr a)
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">Unsupported
</span><a href="#local-6989586621679103361"><span class="hs-identifier hs-var">wh</span></a></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span id="local-6989586621679103427"><span class="annot"><a href="System.Win32.Exception.Unsupported.html#unsupportedVal"><span class="hs-identifier hs-type">unsupportedVal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679103427"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679103427"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-67"></span><span id="unsupportedVal"><span class="annot"><span class="annottext">unsupportedVal :: forall a. String -&gt; IO Bool -&gt; String -&gt; a -&gt; a
</span><a href="System.Win32.Exception.Unsupported.html#unsupportedVal"><span class="hs-identifier hs-var hs-var">unsupportedVal</span></a></span></span><span> </span><span id="local-6989586621679103353"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103353"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679103352"><span class="annot"><span class="annottext">IO Bool
</span><a href="#local-6989586621679103352"><span class="hs-identifier hs-var">checkVer</span></a></span></span><span> </span><span id="local-6989586621679103351"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103351"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span id="local-6989586621679103350"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679103350"><span class="hs-identifier hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; a
forall a. IO a -&gt; a
</span><a href="../../base/src/Foreign.Marshal.Unsafe.html#unsafeLocalState"><span class="hs-identifier hs-var">unsafeLocalState</span></a></span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; a) -&gt; IO a -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-68"></span><span>  </span><span id="local-6989586621679103349"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679103349"><span class="hs-identifier hs-var">cv</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO Bool
</span><a href="#local-6989586621679103352"><span class="hs-identifier hs-var">checkVer</span></a></span><span>
</span><span id="line-69"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679103349"><span class="hs-identifier hs-var">cv</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">a -&gt; IO a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679103350"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Unsupported -&gt; IO a
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">(Unsupported -&gt; IO a) -&gt; Unsupported -&gt; IO a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Unsupported
</span><a href="System.Win32.Exception.Unsupported.html#MissingValue"><span class="hs-identifier hs-var">MissingValue</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103353"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679103351"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span></pre></body></html>